package com.example.demo.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 这个是report 集合类和实体类有区别 主要是整合url发送的所有消息
 */

@Data
public class reportModel {

    private Integer id;
    private String name;

    private String live;

    //当天时间 格式为年-月-日 时-分-秒
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime nowDate;

    //身体状况
    private String healthy;

    //有没有接触患者
    private String sec;

    //做了什么
    private String wdo;

    //学生学号
    private String userId;

    //学生的email 不保存到数据库
    private String email;

}
